<div class="main_form form_personal_user">
    <form id="form_update_user">
        <!----------------------------------------------------------------->
        <div class="row_info">
            <div class="label fl fs12 ta_l w120 mar_r_10">
               <span>Họ tên</span>( <span class="red">*</span> )
            </div>    
            <div class="fl">   
               <div class="">
                    <input type="text" class="tbndTextInput update_u_txt_full_name tbndInput" name="txt_full_name" value="<?php print $i_user->name;?>" data-hasqtip="true" title="" style="width:560px !important;" maxlength="150"  autocomplete="off" outline="off" spellcheck="false">
                    <div class="error update_u_error error_msg update_u_txt_full_name_error">Thông tin này không được trống.</div>  
               </div>  						         
            </div>
            <div class="clf"></div>						
        </div>
        <!----------------------------------------------------------------->
        
        <!----------------------------------------------------------------->
        <div class="row_info">
            <div class="label fl fs12 ta_l w120 mar_r_10">
               <span>Email</span>( <span class="red">*</span> )
            </div>    
            <div class="fl">   
               <div class="">
                    <input type="text" class="tbndTextInput  tbndInput update_u_txt_email disabled" name="update_u_txt_email" value="<?php print $user->mail;?>" data-hasqtip="true" title="" style="width:560px !important;" maxlength="150" disabled>
                    <div class="error update_u_error error_msg update_u_txt_email_error">Thông tin này không được trống.</div>  
               </div>  						         
            </div>
            <div class="clf"></div>						
        </div>
       <!----------------------------------------------------------------->
       
       <!----------------------------------------------------------------->
        <div class="row_info">
            <div class="label fl fs12 ta_l w120 mar_r_10">
               <span>Địa chỉ</span>
            </div>    
            <div class="fl">   
               <div class="">
                    <input type="text" class="tbndTextInput  tbndInput update_u_txt_address" name="update_u_txt_address" value="<?php print $i_user->address;?>" data-hasqtip="true" title="" style="width:560px !important;" maxlength="500"  autocomplete="off" outline="off" spellcheck="false">
                    <div class="error update_u_error error_msg update_u_txt_address_error">Thông tin này không được trống.</div>  
               </div>  						         
            </div>
            <div class="clf"></div>						
        </div>
       <!----------------------------------------------------------------->
       
       <!----------------------------------------------------------------->
        <div class="row_info">
            <div class="label fl fs12 ta_l w120 mar_r_10">
               <span>Di động</span>( <span class="red">*</span> )
            </div>    
            <div class="fl">   
               <div class="">
                    <input type="text" class="tbndTextInput  tbndInput update_u_txt_phone" name="update_u_txt_phone" value="<?php print $i_user->phone;?>" style="width:560px !important;" maxlength="18"  autocomplete="off" outline="off" spellcheck="false">
                    <div class="error update_u_error error_msg update_u_txt_phone_error">Thông tin này không được trống.</div>  
               </div>  						         
            </div>
            <div class="clf"></div>						
        </div>
       <!----------------------------------------------------------------->
       
       <!----------------------------------------------------------------->
        <div class="row_info">
            <div class="label fl fs12 ta_l w120 mar_r_10">
               <span>Điện thoại bàn</span>
            </div>    
            <div class="fl">   
               <div class="">
                    <input type="text" class="tbndTextInput  tbndInput update_u_txt_tel" name="update_u_txt_tel" value="<?php print $i_user->tel;?>"  style="width:560px !important;" maxlength="18"  autocomplete="off" outline="off" spellcheck="false">
                    <div class="error update_u_error error_msg update_u_txt_tel_error">Thông tin này không được trống.</div>  
               </div>  						         
            </div>
            <div class="clf"></div>						
        </div>
       <!----------------------------------------------------------------->
       
        <!----------------------------------------------------------------->
       <div class="row_info">
            <div class="label fl fs12 ta_l w120 mar_r_10">
                <span>Ảnh đại diện</span>               
            </div>
            <div class="fl">						
                <input type="hidden" name="update_u_txt_avatar" value="<?php print $user->picture;?>" class="update_u_txt_avatar" id="update_u_txt_avatar">
                <div id="fil_upload_avatar"></div>	
                <div class="img_avatar">
                    <?php if($user->picture > 0): $avatar = api_file_load( $user->picture ); ?>
                    <img src="<?php print $avatar->thubm;?>" />
                    <?php endif; ?>
                </div>
            </div>                
            <div class="clf"></div>   
        </div>          
        <!----------------------------------------------------------------->
        <div class="">
            <div class="tac">     
                <div class="">
                    <span class="update_u_ajax_loading ajax_loading" style="display:none;"></span>
                    <input type="submit" class="tbnd_btn_submit" name="" value="Sửa" id="btn_update_info_user" style="width:80px;">
                    <span class="mar_r_10"></span>
                    <input id="btnCancel" class="tbnd_btn_cancel" type="reset" value="Hủy" name="btnCancel" style="margin: 0px 4px 0 0; text-align: center;" class="normalblue">
                </div>    
            </div>
        </div>
    </form>
</div>


<script>
jQuery(document).ready(function(){
	(function ($) { 
		var uploader = new qq.FileUploader({
		   element: document.getElementById('fil_upload_avatar'),
            maxConnections: 1,
            multiple: false,
           sizeLimit: 2097152, // max size   
		   action: Drupal.settings.basePath + 'upload/upload_image',		
		   debug: false , 
		   allowedExtensions: ['jpg', 'jpeg', 'png'],
		   uploadButtonText: "Chọn ảnh",
			onProgress: function(id, fileName, loaded , total) {					
			   var percent = (loaded/total) * 100;		
			  $($('#fil_upload_avatar .qq-upload-list li')[id]).find('.upload-image-update_uocess').css('width', percent + '%');
			},	

			onComplete: function(id, fileName, responseJSON){	
                var html = '<img src="' + responseJSON.image + '" style="max-width:152px;">';    
                jQuery('.img_avatar').html( html );
                jQuery('.update_u_txt_avatar').val( responseJSON.fid );               
			}		    
	   });   
	}(jQuery));
});
</script>